package com.fzl.spring_chatroom.utils;

import com.fzl.spring_chatroom.model.dao.Friend;
import com.fzl.spring_chatroom.model.response.FriendInfoResponse;
import org.springframework.beans.BeanUtils;

public class BeanTransUtils {
    public static FriendInfoResponse trans(Friend friend){
        if(friend==null){
            return null;
        }
        FriendInfoResponse friendInfoResponse=new FriendInfoResponse();
        BeanUtils.copyProperties(friend,friendInfoResponse);
        return friendInfoResponse;
    }
}
